﻿namespace IM.Easy.Core.Attributes
{
    [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = false)]
    public class ApiAttribute : Attribute
    {
        public ApiAttribute()
        {

        }

        /// <summary>
        /// 接口名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 接口描述
        /// </summary>
        public string Desc { get; set; }

        /// <summary>
        /// 默认权限字符串，可通过后台进行管理修改
        /// </summary>
        public string Perm { get; set; }

        /// <summary>
        /// 是否可匿名访问
        /// </summary>
        public bool AllowAnonymous { get; set; }

        /// <summary>
        /// 是否记录跟踪日志--默认开启
        /// </summary>
        public bool TrackLog { get; set; } = true;

        /// <summary>
        /// 系统正常运行的必要接口---默认关闭
        /// </summary>
        public bool Required { get; set; } = false;
    }
}
